package com.zzt.trans.service;

import com.zzt.trans.mapper.UserInfoMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created with IntelliJ IDEA.
 * Description
 * User: panda
 * Date: 2025-03-31
 * Time: 20:58
 */
@Service
@Slf4j
public class UserService {

    @Autowired
    private UserInfoMapper userInfoMapper;

    @Transactional(propagation = Propagation.REQUIRED)
    public Integer registryUser(String name, String password){
        //插入用户信息
        return userInfoMapper.insert(name,password);
    }

}
